package main

import "fmt"

type Foo22 struct {
	Name string
}
func (f *Foo22) changeName(newName string) {
	f.Name = newName
	fmt.Printf("xxx %P\n", f)
}
func (f Foo22) changeName2(newName string) {
	f.Name = newName
	fmt.Printf("%P\n", &f.Name)
}

func main () {
	foo := Foo22{Name: "1024"}

	fmt.Printf("%P\n", &foo.Name)
	foo.changeName("2048")
	fmt.Printf("%P\n", &foo.Name)
	foo.changeName2("4096")
	fmt.Printf("%P\n", &foo.Name)
}
